package com.jwmp.core.util;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description TODO
 * @Version 1.0
 */
public class QueryObject {
    private int currentPage = 1;
    private int pageSize = 10;
    private Boolean selectAll = false;

    public int getBeginIndex(){
        return (this.currentPage - 1) * this.pageSize;
    }

    public QueryObject() {
    }

    public QueryObject(Boolean selectAll) {
        this.selectAll = selectAll;
    }

    public QueryObject(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public Boolean isSelectAll() {
        return selectAll;
    }

    public void setSelectAll(Boolean selectAll) {
        this.selectAll = selectAll;
    }
}
